<?php
/**
 * 选项列表
 *
 * @author hiscaler <hiscaler@gmail.com>
 * @link http://www.yuandot.com/
 * @copyright Copyright &copy; 2009-2010 Yuandot Information Technology CO.,LTD.
 * @license http://doit.yuandot.com/license/
 */

class Options {
    // colors
    const COLOR_NULL = '';
    const COLOR_RED = '#FF0000';
    const COLOR_GREEN = '#0F00F0';
    const COLOR_BLACK = '#000000';

    // styles
    const STYLE_NULL = '';
    const STYLE_NORMAL = 'normal';
    const STYLE_BOLD = 'bold';

    // status
    const STATUS_DRAFT = 1; // 草稿
    const STATUS_PUBLISHED = 2; // 已经发布
    const STATUS_PENDING_DELETE = 3; // 待删除（放入回收站）

    // sex
    const SEX_FEMALE = 0;
    const SEX_MALE = 1;

    // recommend
    const RECOMMEND_NO = 0;
    const RECOMMEND_YES = 1;

    // picking
    const PICKING_NO = 0;
    const PICKING_YES = 1;

    // color options
    static public function colorOptions() {
        return array(
            self::COLOR_NULL => Yii::t('options', 'color_null'),
            self::COLOR_RED => Yii::t('options', 'color_red'),
            self::COLOR_GREEN  => Yii::t('options', 'color_green'),
            self::COLOR_BLACK  => Yii::t('options', 'color_black'),
        );
    }

    // style options
    static public function styleOptions() {
        return array(
            self::STYLE_NULL => Yii::t('options', 'style_null'),
            self::STYLE_NORMAL => Yii::t('options', 'style_normal'),
            self::STYLE_BOLD => Yii::t('options', 'style_bold'),
        );
    }

    // status options
    static public function statusOptions() {
        return array(
            self::STATUS_DRAFT => Yii::t('options', 'status_draft'),
            self::STATUS_PUBLISHED => Yii::t('options', 'status_published'),
            self::STATUS_PENDING_DELETE => Yii::t('options', 'status_pending_delete'),
        );
    }

    // sex options
    static public function sexOptions() {
        return array(
            self::SEX_MALE => Yii::t('options', 'sex_male'),
            self::SEX_FEMALE => Yii::t('options', 'sex_female'),
        );
    }
}
